package com.example.springstudy.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import javax.persistence.*;
import java.math.BigDecimal;
import java.time.LocalDateTime;


/**
 * 表格数据
 */
@Entity
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class ChartVal {
    @Id
    @SequenceGenerator(name = "check_result_id_seq", sequenceName = "check_result_id_seq", allocationSize = 1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "check_result_id_seq")
    @Column(name = "id")
    private Long id;
    // 设备类型 深部位移   倾角仪  湿温度仪
    @Column(name = "[type]")
    private String type;
    // 设备 code
    @Column(name = "[deviceCode]")
    private String deviceCode;
    // 设备 名
    @Column(name = "[deviceName]")
    private String deviceName;
    // 测量类型 (湿度  温度  X Y )
    @Column(name = "[measuringType]")
    private String measuringType;
    // 值
    @Column(name = "[Val]")
    private Double Val;
    // 变化率 当前值-上一次值
    @Column(name = "[changeVal]")
    private Double changeVal;
    // 数据状态
    @Column(name = "[valStatus]")
    private String valStatus;
    // 数据完整率
    @Column(name = "[dataIntegrityRate]")
    private Double dataIntegrityRate;
    // 备注
    @Column(name = "[remark]")
    private String remark;

    // 创建时间
    @Column(name = "[createTime]")
    private LocalDateTime createTime;
}
